package edu.java.ishop.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
@Deprecated
public class ApplicationConfiguration {

	private ApplicationConfiguration() {
		
	}

//	private static Properties PROPS = null;
//	private static Properties PROPS = new Properties();
//	static{
//		InputStream is= ApplicationConfiguration.class.getResourceAsStream("/application.properties");
//		try{
//			PROPS.load(is);
//		}catch (IOException e){
//			throw new ExceptionInInitializerError("Failed to load properties");
//		}
//	}
//	private static class AppPropertiesHolder{
//		//singleton implementation based on static initialization
//		public static Properties PROPS = new Properties();
//		
//		static{
//			InputStream is= ApplicationConfiguration.class.getResourceAsStream("/application.properties");
//			try{
//				PROPS.load(is);
//			}catch (IOException e){
//				throw new ExceptionInInitializerError("Failed to load properties");
//			}
//		}
//	}
	
//	public static String getItem(String key){
////		if(PROPS==null){//simple singletone
////			PROPS = new Properties();
////			InputStream is= ApplicationConfiguration.class.getResourceAsStream("/application.properties");
////			try{
////				PROPS.load(is);
////			}catch (IOException e){
////				throw new ExceptionInInitializerError("Failed to load properties");
////			}
////		}
//		return (String)AppPropertiesHolder.PROPS.get(key);
//	}
}
